import {
	apiResquest
} from '@/utils/request.js'


// 免单活动列表
export const getActivityList = query => {
	return apiResquest({
		url: '/api/Activity/list',
		method: 'POST',
		query: query
	})
}
// 领取免单活动优惠券
export const activityReceive = query => {
	return apiResquest({
		url: '/api/Activity/receive',
		method: 'POST',
		query: query
	})
}
// 我的免单券列表
export const getMyFreeCouponList = query => {
	return apiResquest({
		url: '/api/activity_user/list',
		method: 'POST',
		query: query
	})
}
// 个人折扣活动优惠券
export const getCouponList = query => {
	return apiResquest({
		url: '/api/discount_certificate/list',
		method: 'POST',
		query: query
	})
}
// 我的个人折扣活动优惠券
export const getMyCouponList = query => {
	return apiResquest({
		url: '/api/discount_certificate/get_my_discount_list',
		method: 'POST',
		query: query
	})
}


// 获取可购买次卡列表
export const getCardList = query => {
	return apiResquest({
		url: '/api/card/list',
		method: 'POST',
		query: query
	})
}
// 购买次卡
export const payCard = query => {
	return apiResquest({
		url: '/api/card/pay',
		method: 'POST',
		query: query
	})
}
// 获取我的次卡列表
export const getMyCardList = query => {
	return apiResquest({
		url: '/api/card_order/list',
		method: 'POST',
		query: query
	})
}

// 获取我的次卡购买记录列表
export const getMyCardRecordList = query => {
	return apiResquest({
		url: '/api/card_order/record',
		method: 'POST',
		query: query
	})
}

// 获取商家列表
export const getShopList = query => {
	return apiResquest({
		url: '/api/card/getVenues',
		method: 'POST',
		query: query
	})
}

// 获取规则说明
export const getCardRule = query => {
	return apiResquest({
		url: '/api/card/rule',
		method: 'POST',
		query: query
	})
}